/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ventanaMenu.java
 *
 * Created on 25/06/2010, 11:59:01 AM
 */

package CapaGrafica;
import com.itextpdf.text.BadElementException;
import com.itextpdf.text.DocumentException;
import CapaLogica.GestionResort;
import CapaDatos.GenerarReporteSueldo;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import CapaDatos.GenerarReporteCliente;

/**
 *
 * @author Maria
 */
public class ventanaMenu extends javax.swing.JFrame {

    /** Creates new form ventanaMenu */
    public ventanaMenu() {
        initComponents();
        this.setSize(600,500);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jBClientes = new javax.swing.JButton();
        jBConsultaReserva = new javax.swing.JButton();
        jBNomina1 = new javax.swing.JButton();
        jBReserva = new javax.swing.JButton();
        jBRestaurant = new javax.swing.JButton();
        jBSalvarDatos = new javax.swing.JButton();
        jBNomina = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Seleccione:");
        setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        setLocationByPlatform(true);

        jBClientes.setIcon(new javax.swing.ImageIcon("C:\\Users\\Maria\\Documents\\NetBeansProjects\\logocli.jpg")); // NOI18N
        jBClientes.setName("jBClientes"); // NOI18N
        jBClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBClientesActionPerformed(evt);
            }
        });

        jBConsultaReserva.setText("Consulta Reserva");
        jBConsultaReserva.setName("jBConsultaReserva"); // NOI18N
        jBConsultaReserva.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBConsultaReservaActionPerformed(evt);
            }
        });

        jBNomina1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/CapaGrafica/images.jpg"))); // NOI18N
        jBNomina1.setName("jBNomina1"); // NOI18N
        jBNomina1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBNomina1ActionPerformed(evt);
            }
        });

        jBReserva.setIcon(new javax.swing.ImageIcon(getClass().getResource("/CapaGrafica/reservas.gif"))); // NOI18N
        jBReserva.setName("jBReserva"); // NOI18N
        jBReserva.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBReservaActionPerformed(evt);
            }
        });

        jBRestaurant.setIcon(new javax.swing.ImageIcon(getClass().getResource("/CapaGrafica/Restaurantes.gif"))); // NOI18N
        jBRestaurant.setName("jBRestaurant"); // NOI18N
        jBRestaurant.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRestaurantActionPerformed(evt);
            }
        });

        jBSalvarDatos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/CapaGrafica/Cheque.jpg"))); // NOI18N
        jBSalvarDatos.setName("jBSalvarDatos"); // NOI18N
        jBSalvarDatos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSalvarDatosActionPerformed(evt);
            }
        });

        jBNomina.setIcon(new javax.swing.ImageIcon(getClass().getResource("/CapaGrafica/nomina.gif"))); // NOI18N
        jBNomina.setName("jBNomina"); // NOI18N
        jBNomina.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBNominaActionPerformed(evt);
            }
        });

        jSeparator1.setName("jSeparator1"); // NOI18N

        jLabel1.setText("Gestion de clientes:");
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText("Gestion de reservas:");
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setText("Gestion de habitaciones:");
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setText("Gestion de restaurantes:");
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setText("Consulta reserva:");
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setText("Gestion de Reportes:");
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText("Gestion de nominas:");
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel16.setFont(new java.awt.Font("Trebuchet MS", 0, 36));
        jLabel16.setForeground(new java.awt.Color(0, 51, 204));
        jLabel16.setText("i-Resort.");
        jLabel16.setName("jLabel16"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 389, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(224, Short.MAX_VALUE))
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 613, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(72, 72, 72)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(jLabel7)
                    .addComponent(jLabel2)
                    .addComponent(jLabel6)
                    .addComponent(jLabel5)
                    .addComponent(jLabel1))
                .addGap(138, 138, 138)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jBRestaurant, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(jBNomina, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBSalvarDatos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBNomina1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBReserva, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBConsultaReserva, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBClientes, javax.swing.GroupLayout.PREFERRED_SIZE, 82, Short.MAX_VALUE)))
                .addContainerGap(166, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(jBClientes, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(29, 29, 29))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel1)
                                .addGap(42, 42, 42)))
                        .addComponent(jLabel2)
                        .addGap(55, 55, 55)
                        .addComponent(jLabel3))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(129, 129, 129)
                        .addComponent(jBReserva)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBNomina1, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(42, 42, 42)
                        .addComponent(jLabel4))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jBRestaurant)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jBSalvarDatos))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jLabel6)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(29, 29, 29)
                        .addComponent(jLabel7))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jBNomina)))
                .addGap(17, 17, 17)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jBConsultaReserva)
                    .addComponent(jLabel5))
                .addContainerGap(43, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jBRestaurantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRestaurantActionPerformed
      ventanaOperacionesRestaurante elRestaurante = new ventanaOperacionesRestaurante();
elRestaurante.setVisible(true);  // TODO add your handling code here:
    }//GEN-LAST:event_jBRestaurantActionPerformed

    private void jBClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBClientesActionPerformed
        VentanaOperacionesCliente laVentanaOperacionesCliente = new VentanaOperacionesCliente();
      laVentanaOperacionesCliente.setVisible(true);// TODO add your handling code here:
    }//GEN-LAST:event_jBClientesActionPerformed

    private void jBNominaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBNominaActionPerformed
        VentanaOperacionesNomina laVentanaOperacionesNomina = new VentanaOperacionesNomina ();
       laVentanaOperacionesNomina.setVisible(true);// TODO add your handling code here:
    }//GEN-LAST:event_jBNominaActionPerformed

    private void jBReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBReservaActionPerformed
       VentanaOperacionesReserva laVentanaOperacionReserva = new VentanaOperacionesReserva();
       laVentanaOperacionReserva.setVisible(true); // TODO add your handling code here:
    }//GEN-LAST:event_jBReservaActionPerformed

    private void jBNomina1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBNomina1ActionPerformed
       VentanaOperacionesHabitacion laVentanaOperacionesHabitacion = new  VentanaOperacionesHabitacion ();
        laVentanaOperacionesHabitacion.setVisible(true); // TODO add your handling code here:
    }//GEN-LAST:event_jBNomina1ActionPerformed

    private void jBSalvarDatosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSalvarDatosActionPerformed
       GenerarReporteSueldo losSueldos = new GenerarReporteSueldo();
       GenerarReporteCliente losClientesNumReservas = new GenerarReporteCliente ();
        try {
            losClientesNumReservas.generarReporteCliente();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (BadElementException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (MalformedURLException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (DocumentException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            losSueldos.generarReporteSueldo();
        } catch (FileNotFoundException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (BadElementException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (MalformedURLException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } catch (DocumentException ex) {
            Logger.getLogger(ventanaMenu.class.getName()).log(Level.SEVERE, null, ex);
        } // TODO add your handling code here:
    }//GEN-LAST:event_jBSalvarDatosActionPerformed

    private void jBConsultaReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBConsultaReservaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBConsultaReservaActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ventanaMenu().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBClientes;
    private javax.swing.JButton jBConsultaReserva;
    private javax.swing.JButton jBNomina;
    private javax.swing.JButton jBNomina1;
    private javax.swing.JButton jBReserva;
    private javax.swing.JButton jBRestaurant;
    private javax.swing.JButton jBSalvarDatos;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JSeparator jSeparator1;
    // End of variables declaration//GEN-END:variables

}
